import {get, post, put, del} from "@/api/http";

/**
 * userLogin 用户登录
 * @param data
 */
export function userLogin(data: any) {
    return post('/login?username=' + data.username + '&password=' + data.password)
}

export function userRegister(data: any) {
    // nickname=zbh&username=zbh&password=123456
    return post('/user/register', data)
}

// ftp地址功能接口
export function GetFtp() {
    return get('/ftp/config',);
}

export function AddFtp(data: any) {
    return post('/ftp/config', data);
}

export function ResetFtp(data: any) {
    return put('/ftp/config', data
    );
}

export function DelFtp(id: any) {
    return del('/ftp/config/' + id,);
}

export function getdata(params: any) {
    return get('/ftp/image', params,);
}

// 共享地址功能接口
export function GetGX() {
    return get('/share/config',);
}

export function AddGX(data: any) {
    return post(
        '/share/config',
        data
    );
}

export function ResetGX(data: any) {
    return put(
        '/share/config',
        data
    );
}

export function DelGX(id: any) {
    return del(
        '/share/config/' + id,
    );
}

export function sendgxdata(params: any) {
    return get('/share/list/', params);
}

export function getgxdata(params: any) {
    return get('/share/image/', params);
}

export function getolddata(params: any) {
    return get('/udpData/', params);
}



